from Base import Base
from selenium.webdriver.common.by import By

class Page(Base):
    # 定位器
    login_loc = (By.LINK_TEXT,'登录')
    def login(self):
        self.find_element(self.login_loc).click()

    user_input = (By.NAME,'username')
    def send_user(self):
        self.send_keys(self.user_input,'15523615757')

    pwd_input = (By.NAME, 'password')
    def send_pwd(self):
        self.send_keys(self.pwd_input, '123456')

    login_button = (By.CLASS_NAME,'finish-btn')
    def click_login(self):
        self.click(self.login_button)

    def luoji_A3mall(self):
        self.open_url('http://10.59.9.12:7001/')
        self.login()
        self.send_user()
        self.send_pwd()
        self.click_login()